package com.yyi.springcloud.service.impl;

import com.yyi.springcloud.dao.WindowConfigMapper;
import com.yyi.springcloud.entities.WindowConfigModel;
import com.yyi.springcloud.service.Local_WindowConfigService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Local_WindowConfigServiceImpl implements Local_WindowConfigService {
    @Resource
    private WindowConfigMapper windowConfigMapper;

    public WindowConfigMapper getWindowConfigMapper() {
        return windowConfigMapper;
    }

    public void setWindowConfigMapper(WindowConfigMapper windowConfigMapper) {
        this.windowConfigMapper = windowConfigMapper;
    }

    @Override
    public List<WindowConfigModel> getWindowConfigByCondition(WindowConfigModel windowConfigModel) {
        Example example = new Example(WindowConfigModel.class);
//        example.orderBy("testunitno").asc();
//        example.createCriteria().andLike("primarykey",testDate+"%");
        return windowConfigMapper.select(windowConfigModel);
    }
}
